package com.design.common;

/**
* Description: 命令模式<br/>
* date: 2023/11/24 14:32<br/>
* @author: zhangzaijun <br/>
* @since JDK 1.8
*/

public class CommonMain {
    public static void main(String[] args) {
        Stock stock = new Stock();

        BuyStock buStock = new BuyStock(stock);
        SellStock sellStock = new SellStock(stock);

        Brocker brocker = new Brocker();
        brocker.takeOrder(buStock);
        brocker.takeOrder(sellStock);

        brocker.placeOrders();
    }
}
